<template>
  <div>
    <el-table v-loading="loading" :data="list" highlight-current-row>
      <el-table-column
        label="项目"
        align="center"
        prop="projectName"
        show-overflow-tooltip
      />
      <el-table-column
        label="结果"
        align="center"
        prop="result"
        show-overflow-tooltip
      />
      <el-table-column label="未检明细" align="center" prop="state" />
      <el-table-column label="操作" fixed="right">
        <template slot-scope="scope">
          <el-button type="text" size="small" @click="handleChecked(scope.row)">
            置为已检
          </el-button>
          <el-button type="text" size="small" @click="handleReject(scope.row)">
            拒检
          </el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  name: "TableData",
  data() {
    return {
      // 遮罩层
      loading: false,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        skipCount: 0,
        maxResultCount: 10,
      },
      // 表格列表
      list: [
        {
          projectName: "222",
          result: "222",
          state: "未检明细",
        },
        {
          projectName: "222",
          result: "222",
          state: "未检明细",
        },
        {
          projectName: "222",
          result: "222",
          state: "未检明细",
        },
        {
          projectName: "222",
          result: "222",
          state: "未检明细",
        },
      ],
    };
  },
  computed: {},
  methods: {
    // 置为已检
    handleChecked(row) {
      console.log(row);
    },
    // 拒检
    handleReject() {
      console.log("删除", this.$route.query.registerId);
      const ids = this.$route.query.registerId;
      this.$modal
        .confirm("是否确认拒检？")
        .then(function () {
          // return delProject(ids);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("拒检成功");
        })
        .catch(() => {});
    },
  },
};
</script>

<style>
</style>
